package com.baidu.shoppingmall.role.dao;


import com.baidu.shoppingmall.role.domain.PermissionPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionDao extends BaseMapper<PermissionPO> {

    @Select("select *from tbl_permission where id in (select permission_id from tbl_role_permission_relation where role_id in (select role_id from tbl_user_role_relation where user_id=#{id}))")
    List<PermissionPO> queryUser(String id);
}
